// 首页
import axios from '@/api/request/request'

// 全部
const rolesAll = (option: any) => {
  return axios.get('/roles/all', { ...option })
}

// 列表
const rolesList = (option: any) => {
  return axios.get('/roles/list', { ...option })
}

// 保存
const rolesSave = (option: any) => {
  return axios.post('/roles/save', { ...option })
}

// 删除
const rolesDelete = (option: any) => {
  return axios.get('/roles/delete', option)
}

// 获取已勾选的权限菜单
const rolesMenusList = (option: any) => {
  return axios.get('/rolesMenus/list', option)
}

// 保存已勾选的权限菜单
const rolesMenusSave = (option: any) => {
  return axios.post('/rolesMenus/save', option)
}

export { rolesAll, rolesList, rolesSave, rolesDelete, rolesMenusList, rolesMenusSave }
